<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/11/14
 * Time: 11:08
 * 添加专拣用户
 */

//获取参数
$osu_username            = $route->bodyParams['osu_username'];         //用户名
$osu_password            = $route->bodyParams['osu_password'];         //密码
$osu_name                = $route->bodyParams['osu_name'];             //专家姓名
$osu_type                = $route->bodyParams['osu_type'];             //所属分类所属分类  0-运营管理问题 1-团队与绩效问题 2-日常经营问题 3-营销招生问题
$osu_is_leader           = $route->bodyParams['osu_is_leader'];       //是否为组长 0否 1是
$osu_cover               = $route->bodyParams['osu_cover'];            //专家封面图
$osu_sign                = $route->bodyParams['osu_sign'];             //个人签名
$osu_tags                = $route->bodyParams['osu_tags'];             //标签用|隔开
$osu_desc                = $route->bodyParams['osu_desc'];             //专家封面图
$osu_experience          = $route->bodyParams['osu_experience'];      //从事经历
$osu_honor               = $route->bodyParams['osu_honor'];           //所获荣誉
$osu_create_time         = time();


//写入数组
$insertArr = [
    'osu_username'             => $osu_username,
    'osu_password'             => md5($osu_password),
    'osu_name'                 => $osu_name,
    'osu_type'                 => $osu_type,
    'osu_is_leader'           => $osu_is_leader,
    'osu_cover'               => $osu_cover,
    'osu_sign'                => $osu_sign,
    'osu_tags'                => $osu_tags,
    'osu_desc'                => $osu_desc,
    'osu_experience'         => $osu_experience,
    'osu_honor'              => $osu_honor,
    'osu_create_time'       => $osu_create_time,
    'osu_answer_count'      => 0
];

//执行写入语句
$rsData = $db->mysqlDB->insert("oa_specialist_user",$insertArr);

//返回成功结果
$response->responseData( true, $rsData );